import java.util.Scanner;

public class PokemonGame {
    private static final String START_GAME = "Y";
    private static final String QUIT_GAME = "N";

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        boolean isPlaying = true;

        while (isPlaying) {
            System.out.println("请选择是否进入游戏");
            System.out.println("是（Y）否（N）");
            String userChoice = scanner.nextLine().toUpperCase();

            switch (userChoice) {
                case START_GAME:
                    startNewGame();
                    isPlaying = false; // 一旦开始游戏，就停止询问
                    break;
                case QUIT_GAME:
                    isPlaying = false; // 一旦退出游戏，就停止询问
                    System.out.println("谢谢，下次再见！");
                    break;
                default:
                    System.out.println("请输入正确的选项");
            }
        }
    }

    private static void startNewGame() {
        // 创建游戏管理器
        System.out.println("进入游戏");
        GameManager gameManager = new GameManager();
        // 开始游戏
        gameManager.startGame();
        // 游戏循环
        gameManager.gameLoop();
    }
}


